package com.hh.example.required;

import com.hh.example.AutoWired.Home;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.stereotype.Component;

/**
 * Created by Administrator on 16-3-23.
 */
@Component
public class People {
    private Home home;
    private String name;
    public Home getHome() {
        return home;
    }

    @Required
    @Autowired
    public void setHome(Home home) {
        this.home = home;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
